package main

import "fmt"

func main() {
	myAge := Age(10)
	newAge := myAge.Increase()
	fmt.Println(newAge)
	//fmt.Println(newAge == myAge) //1、为什么不能对比？
	fmt.Println(newAge == int32(myAge))
	fmt.Printf("%T\n  %T\n ", myAge, newAge)
}

//type Age int
type Age int32

func (age *Age) Increase() (newAge int32) {
	//newAge = int32(*age++) //2、注意这个写法的问题
	*age++
	newAge = int32(*age)
	return
}